﻿import clr
try:
	clr.AddReference("Microsoft.SharePoint")
	from Microsoft.SharePoint import *
	from Microsoft.SharePoint.Administration import *
except:
	#this occurs if only CSOM is used since there is no SharePoint dll on client machine
	print "error"

clr.AddReference("System.Windows.Forms")
from System import *

try:
	clr.AddReference("Microsoft.SharePoint.Client")
	clr.AddReference("Microsoft.SharePoint.Client.Runtime")
	from Microsoft.SharePoint.Client import *
except:
	#this means that SharePoint.Client dll is missing
	print "error"

from System.Security import *
from System.Net import *